<div class="page_title">
    <h2 class="fl">{$pageTitle}</h2>
    <a class="fr top_rt_btn iconfont iconfont-chexiao" href="{:U('admin/System/shielding')}">返回列表</a>
</div>
<section>
    <ul class="ulColumn2">
        <input type="hidden" name="config_id" value="{:encrypt_id($info.config_id)}" />
        <li>
            <span class="item_name" style="width:120px;">敏感词：</span>
            <input name="keyword" type="text" class="textbox textbox_295" value="{$info.value}"  placeholder="" />
            <div class="tishi"><i class="iconfont iconfont-tishi"></i>敏感词可以是中文、英文、数字及符号</div>
        </li>
        <li>
            <span class="item_name" style="width:120px;"></span>
            <input type="submit" id="submit" class="link_btn" value="保存"/>
        </li>
    </ul>
</section>
<script>
$(function(){
    $("#submit").click(function(){
        var keyword = $("input[name='keyword']").val();
        if(!keyword){
            msg_info('请填写敏感词');
            return false;
        }
        var send_data = {
              url:U('admin/System/shielding_edit'),
              type:'POST',
              data:{
                  config_id:$("input[name='config_id']").val(),
                  keyword:keyword
              }
        };
        send_ajax(send_data,function(res){
            if(res.status == 1){
                msg_success('请手动点击更新词库,否则无法同步到移动端',res.data.info,1800);
                setTimeout(function(){
                    admin.getContentByUrl(res.data.jumpurl);
                },1800);
            }else{
                msg_error(res.message);
            }
        });
    })
});
</script>